package com.young.aidl_base_server;

import android.os.IInterface;
import android.os.RemoteCallbackList;
import android.util.Log;

/**
 * Author：young
 * .
 * Time： 17/9/2023 AM10:16 Sun
 * .
 * Desc：监听集合
 * <p>
 * 为了监听客户端什么时候与服务端断开连接，需要自定义一个 RemoteCallbackList，方便对外监听
 */
public class MyRemoteCallbackList<T extends IInterface> extends RemoteCallbackList<T> {

    public static final String TAG = "Young-AIDL-" + MyRemoteCallbackList.class.getSimpleName();

    @Override
    public void onCallbackDied(T callback, Object cookie) {
        super.onCallbackDied(callback, cookie);
        Log.e(TAG, "onCallbackDied: " + cookie);
    }

    @Override
    public void onCallbackDied(T callback) {
        super.onCallbackDied(callback);
    }
}
